package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the EXTORNO database table.
 * 
 */
@Entity
@Table(name="EXTORNO")
public class Extorno implements Serializable {
	private static final long serialVersionUID = 1L;
	private long extornoId;
	private String glosa;
	private BigDecimal monto;
	private Date tsCrea;
	private String usrCaja;
	private String usrTeso;
	private Abono abono;

    public Extorno() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="EXTORNO_ID", unique=true, nullable=false)
	public long getExtornoId() {
		return this.extornoId;
	}

	public void setExtornoId(long extornoId) {
		this.extornoId = extornoId;
	}


	@Column(nullable=false, length=255)
	public String getGlosa() {
		return this.glosa;
	}

	public void setGlosa(String glosa) {
		this.glosa = glosa;
	}


	@Column(nullable=false, precision=12, scale=2)
	public BigDecimal getMonto() {
		return this.monto;
	}

	public void setMonto(BigDecimal monto) {
		this.monto = monto;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA")
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


	@Column(name="USR_CAJA", nullable=false, length=15)
	public String getUsrCaja() {
		return this.usrCaja;
	}

	public void setUsrCaja(String usrCaja) {
		this.usrCaja = usrCaja;
	}


	@Column(name="USR_TESO", nullable=false, length=15)
	public String getUsrTeso() {
		return this.usrTeso;
	}

	public void setUsrTeso(String usrTeso) {
		this.usrTeso = usrTeso;
	}


	//bi-directional many-to-one association to Abono
    @ManyToOne
	@JoinColumn(name="ABONO_ID", nullable=false)
	public Abono getAbono() {
		return this.abono;
	}

	public void setAbono(Abono abono) {
		this.abono = abono;
	}
	
}